home *** CD-ROM | disk | FTP | other *** search
- -- card: 19750 from stack: in.03
- -- bmap block id: 0
- -- flags: 0000
- -- background id: 7844
- -- name:
-
-
- -- part 1 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=280 top=213 right=247 bottom=323
- -- title width / last selected line: 0
- -- icon id / first selected line: 22332 / 22332
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Ball
- ----- HyperTalk script -----
- on mouseEnter
- repeat
- set cursor to 22
- show me at the mouseloc
- if the mouse is down
- then
- set cursor to none
- dropBall
- exit repeat
- end if
- end repeat
- end mouseEnter
-
- on dropBall
- global s, floor
- put 230 into floor
- put 1.2 into gravity
- put 1.3 into bounce
- put 4 into s
- put item 1 of loc of me into h
- put item 2 of loc of me into v
- repeat
- repeat
- show me at h,v
- put s^(gravity) into s
- put round(v + s) into v
- if v > floor then
- put floor into v
- exit repeat
- end if
- end repeat
- show me at h,v
-
- repeat with k = 1 to 3
- set icon of me to "ball" && k
- end repeat
- play "bounce"
- repeat with k = 2 down to 1
- set icon of me to "ball" && k
- end repeat
-
- put s/bounce into s
- repeat
- put v into temp
- put s^(1/gravity) into s
- put round(v - s) into v
- show me at h,v
-
- if abs(v - floor) < 10 then
- set icon of me to "ball 1"
- put floor into v
- show me at h,v
- exit dropBall
- end if
- if temp - v < 10 then
- exit repeat
- end if
- end repeat
- end repeat
- end dropBall
-
-
- -- part contents for background part 11
- ----- text -----
- Bouncing Ball
-
- -- part contents for background part 12
- ----- text -----
- Put the cursor on the ball, drag it up, and then click to let go of it.